package com.kinyx.framework.reflect;

import java.lang.reflect.Field;

import org.junit.Assert;
import org.junit.Test;

public class KFieldUtils_Tester_get_set {

	public static class Super {

		// normal
		@SuppressWarnings("unused")
		private String private_normal = "foo";
		protected String protected_normal = "foo";
		String package_normal = "foo";
		public String public_normal = "foo";

		// normal getters
		private String private_normal_getter = "foo";
		protected String protected_normal_getter = "foo";
		String package_normal_getter = "foo";
		public String public_normal_getter = "foo";

		public String getPrivate_normal_getter() { return this.private_normal_getter + " by getter"; }
		public String getProtected_normal_getter() { return this.protected_normal_getter + " by getter"; }
		public String getPackage_normal_getter() { return this.package_normal_getter + " by getter"; }
		public String getPublic_normal_getter() { return this.public_normal_getter + " by getter"; }

		public void setPrivate_normal_getter(final String private_normal_getter) { this.private_normal_getter = private_normal_getter; }
		public void setProtected_normal_getter(final String protected_normal_getter) { this.protected_normal_getter = protected_normal_getter; }
		public void setPackage_normal_getter(final String package_normal_getter) { this.package_normal_getter = package_normal_getter; }
		public void setPublic_normal_getter(final String public_normal_getter) { this.public_normal_getter = public_normal_getter; }

		// static
		@SuppressWarnings("unused")
		private static String private_static = "foo";
		protected static String protected_static = "foo";
		static String package_static = "foo";
		public static String public_static = "foo";

		// static getters
		private static String private_static_getter = "foo";
		protected static String protected_static_getter = "foo";
		static String package_static_getter = "foo";
		public static String public_static_getter = "foo";

		public static String getPrivate_static_getter() { return private_static_getter + " by getter"; }
		public static String getProtected_static_getter() { return protected_static_getter + " by getter"; }
		public static String getPackage_static_getter() { return package_static_getter + " by getter"; }
		public static String getPublic_static_getter() { return public_static_getter + " by getter"; }

		public static void setPrivate_static_getter(final String private_static_getter) { Super.private_static_getter = private_static_getter; }
		public static void setProtected_static_getter(final String protected_static_getter) { Super.protected_static_getter = protected_static_getter; }
		public static void setPackage_static_getter(final String package_static_getter) { Super.package_static_getter = package_static_getter; }
		public static void setPublic_static_getter(final String public_static_getter) { Super.public_static_getter = public_static_getter; }

		// normal super
		@SuppressWarnings("unused")
		private String private_normal_super = "foo";
		protected String protected_normal_super = "foo";
		String package_normal_super = "foo";
		public String public_normal_super = "foo";

		// normal getters super
		private String private_normal_super_getter = "foo";
		protected String protected_normal_super_getter = "foo";
		String package_normal_super_getter = "foo";
		public String public_normal_super_getter = "foo";

		public String getPrivate_normal_super_getter() { return this.private_normal_super_getter + " by getter"; }
		public String getProtected_normal_super_getter() { return this.protected_normal_super_getter + " by getter"; }
		public String getPackage_normal_super_getter() { return this.package_normal_super_getter + " by getter"; }
		public String getPublic_normal_super_getter() { return this.public_normal_super_getter + " by getter"; }

		public void setPrivate_normal_super_getter(final String private_normal_super_getter) { this.private_normal_super_getter = private_normal_super_getter; }
		public void setProtected_normal_super_getter(final String protected_normal_super_getter) { this.protected_normal_super_getter = protected_normal_super_getter; }
		public void setPackage_normal_super_getter(final String package_normal_super_getter) { this.package_normal_super_getter = package_normal_super_getter; }
		public void setPublic_normal_super_getter(final String public_normal_super_getter) { this.public_normal_super_getter = public_normal_super_getter; }

		// static super
		@SuppressWarnings("unused")
		private static String private_static_super = "foo";
		protected static String protected_static_super = "foo";
		static String package_static_super = "foo";
		public static String public_static_super = "foo";

		// static getters super
		private static String private_static_super_getter = "foo";
		protected static String protected_static_super_getter = "foo";
		static String package_static_super_getter = "foo";
		public static String public_static_super_getter = "foo";

		public static String getPrivate_static_super_getter() { return private_static_super_getter + " by getter"; }
		public static String getProtected_static_super_getter() { return protected_static_super_getter + " by getter"; }
		public static String getPackage_static_super_getter() { return package_static_super_getter + " by getter"; }
		public static String getPublic_static_super_getter() { return public_static_super_getter + " by getter"; }

		public static void setPrivate_static_super_getter(final String private_static_super_getter) { Super.private_static_super_getter = private_static_super_getter; }
		public static void setProtected_static_super_getter(final String protected_static_super_getter) { Super.protected_static_super_getter = protected_static_super_getter; }
		public static void setPackage_static_super_getter(final String package_static_super_getter) { Super.package_static_super_getter = package_static_super_getter; }
		public static void setPublic_static_super_getter(final String public_static_super_getter) { Super.public_static_super_getter = public_static_super_getter; }

	}

	public static class Sub extends Super {

		// normal
		@SuppressWarnings("unused")
		private String private_normal = "bar";
		protected String protected_normal = "bar";
		String package_normal = "bar";
		public String public_normal = "bar";

		// normal getters
		private String private_normal_getter = "bar";
		protected String protected_normal_getter = "bar";
		String package_normal_getter = "bar";
		public String public_normal_getter = "bar";

		@Override
		public String getPrivate_normal_getter() { return this.private_normal_getter + " from getter"; }
		@Override
		public String getProtected_normal_getter() { return this.protected_normal_getter + " from getter"; }
		@Override
		public String getPackage_normal_getter() { return this.package_normal_getter + " from getter"; }
		@Override
		public String getPublic_normal_getter() { return this.public_normal_getter + " from getter"; }

		@Override
		public void setPrivate_normal_getter(final String private_normal_getter) { this.private_normal_getter = private_normal_getter; }
		@Override
		public void setProtected_normal_getter(final String protected_normal_getter) { this.protected_normal_getter = protected_normal_getter; }
		@Override
		public void setPackage_normal_getter(final String package_normal_getter) { this.package_normal_getter = package_normal_getter; }
		@Override
		public void setPublic_normal_getter(final String public_normal_getter) { this.public_normal_getter = public_normal_getter; }

		// static
		@SuppressWarnings("unused")
		private static String private_static = "bar";
		protected static String protected_static = "bar";
		static String package_static = "bar";
		public static String public_static = "bar";

		// static getters
		private static String private_static_getter = "bar";
		protected static String protected_static_getter = "bar";
		static String package_static_getter = "bar";
		public static String public_static_getter = "bar";

		public static String getPrivate_static_getter() { return private_static_getter + " from getter"; }
		public static String getProtected_static_getter() { return protected_static_getter + " from getter"; }
		public static String getPackage_static_getter() { return package_static_getter + " from getter"; }
		public static String getPublic_static_getter() { return public_static_getter + " from getter"; }

		public static void setPrivate_static_getter(final String private_static_getter) { Sub.private_static_getter = private_static_getter; }
		public static void setProtected_static_getter(final String protected_static_getter) { Sub.protected_static_getter = protected_static_getter; }
		public static void setPackage_static_getter(final String package_static_getter) { Sub.package_static_getter = package_static_getter; }
		public static void setPublic_static_getter(final String public_static_getter) { Sub.public_static_getter = public_static_getter; }

		// normal sub
		@SuppressWarnings("unused")
		private String private_normal_sub = "bar";
		protected String protected_normal_sub = "bar";
		String package_normal_sub = "bar";
		public String public_normal_sub = "bar";

		// normal getters sub
		private String private_normal_sub_getter = "bar";
		protected String protected_normal_sub_getter = "bar";
		String package_normal_sub_getter = "bar";
		public String public_normal_sub_getter = "bar";

		public String getPrivate_normal_sub_getter() { return this.private_normal_sub_getter + " from getter"; }
		public String getProtected_normal_sub_getter() { return this.protected_normal_sub_getter + " from getter"; }
		public String getPackage_normal_sub_getter() { return this.package_normal_sub_getter + " from getter"; }
		public String getPublic_normal_sub_getter() { return this.public_normal_sub_getter + " from getter"; }

		public void setPrivate_normal_sub_getter(final String private_normal_sub_getter) { this.private_normal_sub_getter = private_normal_sub_getter; }
		public void setProtected_normal_sub_getter(final String protected_normal_sub_getter) { this.protected_normal_sub_getter = protected_normal_sub_getter; }
		public void setPackage_normal_sub_getter(final String package_normal_sub_getter) { this.package_normal_sub_getter = package_normal_sub_getter; }
		public void setPublic_normal_sub_getter(final String public_normal_sub_getter) { this.public_normal_sub_getter = public_normal_sub_getter; }

		// static sub
		@SuppressWarnings("unused")
		private static String private_static_sub = "bar";
		protected static String protected_static_sub = "bar";
		static String package_static_sub = "bar";
		public static String public_static_sub = "bar";

		// static getters sub
		private static String private_static_sub_getter = "bar";
		protected static String protected_static_sub_getter = "bar";
		static String package_static_sub_getter = "bar";
		public static String public_static_sub_getter = "bar";

		public static String getPrivate_static_sub_getter() { return private_static_sub_getter + " from getter"; }
		public static String getProtected_static_sub_getter() { return protected_static_sub_getter + " from getter"; }
		public static String getPackage_static_sub_getter() { return package_static_sub_getter + " from getter"; }
		public static String getPublic_static_sub_getter() { return public_static_sub_getter + " from getter"; }

		public static void setPrivate_static_sub_getter(final String private_static_sub_getter) { Sub.private_static_sub_getter = private_static_sub_getter; }
		public static void setProtected_static_sub_getter(final String protected_static_sub_getter) { Sub.protected_static_sub_getter = protected_static_sub_getter; }
		public static void setPackage_static_sub_getter(final String package_static_sub_getter) { Sub.package_static_sub_getter = package_static_sub_getter; }
		public static void setPublic_static_sub_getter(final String public_static_sub_getter) { Sub.public_static_sub_getter = public_static_sub_getter; }

	}

	private String get(final Object obj, final String fieldName) {
		final Field field = KFieldUtils.getField(obj.getClass(), fieldName, true, true);
		return (String) KFieldUtils.get(obj, field);
	}

	@Test
	public void test1() {
		// Super normal
		Assert.assertEquals("foo", this.get(new Super(), "private_normal"));
		Assert.assertEquals("foo", this.get(new Super(), "protected_normal"));
		Assert.assertEquals("foo", this.get(new Super(), "package_normal"));
		Assert.assertEquals("foo", this.get(new Super(), "public_normal"));

		// Super normal getter
		Assert.assertEquals("foo by getter", this.get(new Super(), "private_normal_getter"));
		Assert.assertEquals("foo by getter", this.get(new Super(), "protected_normal_getter"));
		Assert.assertEquals("foo by getter", this.get(new Super(), "package_normal_getter"));
		Assert.assertEquals("foo by getter", this.get(new Super(), "public_normal_getter"));

		// Super static
		Assert.assertEquals("foo", this.get(new Super(), "private_static"));
		Assert.assertEquals("foo", this.get(new Super(), "protected_static"));
		Assert.assertEquals("foo", this.get(new Super(), "package_static"));
		Assert.assertEquals("foo", this.get(new Super(), "public_static"));

		// Super static getter
		Assert.assertEquals("foo by getter", this.get(new Super(), "private_static_getter"));
		Assert.assertEquals("foo by getter", this.get(new Super(), "protected_static_getter"));
		Assert.assertEquals("foo by getter", this.get(new Super(), "package_static_getter"));
		Assert.assertEquals("foo by getter", this.get(new Super(), "public_static_getter"));

		// Sub normal
		Assert.assertEquals("bar", this.get(new Sub(), "private_normal"));
		Assert.assertEquals("bar", this.get(new Sub(), "protected_normal"));
		Assert.assertEquals("bar", this.get(new Sub(), "package_normal"));
		Assert.assertEquals("bar", this.get(new Sub(), "public_normal"));

		// Sub normal getter
		Assert.assertEquals("bar from getter", this.get(new Sub(), "private_normal_getter"));
		Assert.assertEquals("bar from getter", this.get(new Sub(), "protected_normal_getter"));
		Assert.assertEquals("bar from getter", this.get(new Sub(), "package_normal_getter"));
		Assert.assertEquals("bar from getter", this.get(new Sub(), "public_normal_getter"));

		// Sub static
		Assert.assertEquals("bar", this.get(new Sub(), "private_static"));
		Assert.assertEquals("bar", this.get(new Sub(), "protected_static"));
		Assert.assertEquals("bar", this.get(new Sub(), "package_static"));
		Assert.assertEquals("bar", this.get(new Sub(), "public_static"));

		// Sub static getter
		Assert.assertEquals("bar from getter", this.get(new Sub(), "private_static_getter"));
		Assert.assertEquals("bar from getter", this.get(new Sub(), "protected_static_getter"));
		Assert.assertEquals("bar from getter", this.get(new Sub(), "package_static_getter"));
		Assert.assertEquals("bar from getter", this.get(new Sub(), "public_static_getter"));
	}

	@Test
	public void test11() {
		// Super normal super
		Assert.assertEquals("foo", this.get(new Super(), "private_normal_super"));
		Assert.assertEquals("foo", this.get(new Super(), "protected_normal_super"));
		Assert.assertEquals("foo", this.get(new Super(), "package_normal_super"));
		Assert.assertEquals("foo", this.get(new Super(), "public_normal_super"));

		// Super normal super getter 
		Assert.assertEquals("foo by getter", this.get(new Super(), "private_normal_super_getter"));
		Assert.assertEquals("foo by getter", this.get(new Super(), "protected_normal_super_getter"));
		Assert.assertEquals("foo by getter", this.get(new Super(), "package_normal_super_getter"));
		Assert.assertEquals("foo by getter", this.get(new Super(), "public_normal_super_getter"));

		// Super static super
		Assert.assertEquals("foo", this.get(new Super(), "private_static_super"));
		Assert.assertEquals("foo", this.get(new Super(), "protected_static_super"));
		Assert.assertEquals("foo", this.get(new Super(), "package_static_super"));
		Assert.assertEquals("foo", this.get(new Super(), "public_static_super"));

		// Super static super getter
		Assert.assertEquals("foo by getter", this.get(new Super(), "private_static_super_getter"));
		Assert.assertEquals("foo by getter", this.get(new Super(), "protected_static_super_getter"));
		Assert.assertEquals("foo by getter", this.get(new Super(), "package_static_super_getter"));
		Assert.assertEquals("foo by getter", this.get(new Super(), "public_static_super_getter"));

		// Sub normal super
		Assert.assertEquals("foo", this.get(new Sub(), "private_normal_super"));
		Assert.assertEquals("foo", this.get(new Sub(), "protected_normal_super"));
		Assert.assertEquals("foo", this.get(new Sub(), "package_normal_super"));
		Assert.assertEquals("foo", this.get(new Sub(), "public_normal_super"));

		// Sub normal super getter 
		Assert.assertEquals("foo by getter", this.get(new Sub(), "private_normal_super_getter"));
		Assert.assertEquals("foo by getter", this.get(new Sub(), "protected_normal_super_getter"));
		Assert.assertEquals("foo by getter", this.get(new Sub(), "package_normal_super_getter"));
		Assert.assertEquals("foo by getter", this.get(new Sub(), "public_normal_super_getter"));

		// Sub static super
		Assert.assertEquals("foo", this.get(new Sub(), "private_static_super"));
		Assert.assertEquals("foo", this.get(new Sub(), "protected_static_super"));
		Assert.assertEquals("foo", this.get(new Sub(), "package_static_super"));
		Assert.assertEquals("foo", this.get(new Sub(), "public_static_super"));

		// Sub static super getter
		Assert.assertEquals("foo by getter", this.get(new Sub(), "private_static_super_getter"));
		Assert.assertEquals("foo by getter", this.get(new Sub(), "protected_static_super_getter"));
		Assert.assertEquals("foo by getter", this.get(new Sub(), "package_static_super_getter"));
		Assert.assertEquals("foo by getter", this.get(new Sub(), "public_static_super_getter"));

		// Sub normal sub
		Assert.assertEquals("bar", this.get(new Sub(), "private_normal_sub"));
		Assert.assertEquals("bar", this.get(new Sub(), "protected_normal_sub"));
		Assert.assertEquals("bar", this.get(new Sub(), "package_normal_sub"));
		Assert.assertEquals("bar", this.get(new Sub(), "public_normal_sub"));

		// Sub normal sub getter
		Assert.assertEquals("bar from getter", this.get(new Sub(), "private_normal_sub_getter"));
		Assert.assertEquals("bar from getter", this.get(new Sub(), "protected_normal_sub_getter"));
		Assert.assertEquals("bar from getter", this.get(new Sub(), "package_normal_sub_getter"));
		Assert.assertEquals("bar from getter", this.get(new Sub(), "public_normal_sub_getter"));

		// Sub static sub
		Assert.assertEquals("bar", this.get(new Sub(), "private_static_sub"));
		Assert.assertEquals("bar", this.get(new Sub(), "protected_static_sub"));
		Assert.assertEquals("bar", this.get(new Sub(), "package_static_sub"));
		Assert.assertEquals("bar", this.get(new Sub(), "public_static_sub"));

		// Sub static sub getter
		Assert.assertEquals("bar from getter", this.get(new Sub(), "private_static_sub_getter"));
		Assert.assertEquals("bar from getter", this.get(new Sub(), "protected_static_sub_getter"));
		Assert.assertEquals("bar from getter", this.get(new Sub(), "package_static_sub_getter"));
		Assert.assertEquals("bar from getter", this.get(new Sub(), "public_static_sub_getter"));
	}

	private String getAfterSet(final Object obj, final String fieldName, final String setted) {
		final Field field = KFieldUtils.getField(obj.getClass(), fieldName, true, true);
		KFieldUtils.set(obj, field, setted);
		return (String) KFieldUtils.get(obj, field);
	}

	@Test
	public void test2() {
		// Super normal
		Assert.assertEquals("qux", this.getAfterSet(new Super(), "private_normal", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Super(), "protected_normal", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Super(), "package_normal", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Super(), "public_normal", "qux"));

		// Super normal getter
		Assert.assertEquals("qux by getter", this.getAfterSet(new Super(), "private_normal_getter", "qux"));
		Assert.assertEquals("qux by getter", this.getAfterSet(new Super(), "protected_normal_getter", "qux"));
		Assert.assertEquals("qux by getter", this.getAfterSet(new Super(), "package_normal_getter", "qux"));
		Assert.assertEquals("qux by getter", this.getAfterSet(new Super(), "public_normal_getter", "qux"));

		// Super static
		Assert.assertEquals("qux", this.getAfterSet(new Super(), "private_static", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Super(), "protected_static", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Super(), "package_static", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Super(), "public_static", "qux"));

		// Super static getter
		Assert.assertEquals("qux by getter", this.getAfterSet(new Super(), "private_static_getter", "qux"));
		Assert.assertEquals("qux by getter", this.getAfterSet(new Super(), "protected_static_getter", "qux"));
		Assert.assertEquals("qux by getter", this.getAfterSet(new Super(), "package_static_getter", "qux"));
		Assert.assertEquals("qux by getter", this.getAfterSet(new Super(), "public_static_getter", "qux"));

		// Sub normal
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "private_normal", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "protected_normal", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "package_normal", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "public_normal", "qux"));

		// Sub normal getter
		Assert.assertEquals("qux from getter", this.getAfterSet(new Sub(), "private_normal_getter", "qux"));
		Assert.assertEquals("qux from getter", this.getAfterSet(new Sub(), "protected_normal_getter", "qux"));
		Assert.assertEquals("qux from getter", this.getAfterSet(new Sub(), "package_normal_getter", "qux"));
		Assert.assertEquals("qux from getter", this.getAfterSet(new Sub(), "public_normal_getter", "qux"));

		// Sub static
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "private_static", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "protected_static", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "package_static", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "public_static", "qux"));

		// Sub static getter
		Assert.assertEquals("qux from getter", this.getAfterSet(new Sub(), "private_static_getter", "qux"));
		Assert.assertEquals("qux from getter", this.getAfterSet(new Sub(), "protected_static_getter", "qux"));
		Assert.assertEquals("qux from getter", this.getAfterSet(new Sub(), "package_static_getter", "qux"));
		Assert.assertEquals("qux from getter", this.getAfterSet(new Sub(), "public_static_getter", "qux"));
	}

	@Test
	public void test21() {
		// Super normal super
		Assert.assertEquals("qux", this.getAfterSet(new Super(), "private_normal_super", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Super(), "protected_normal_super", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Super(), "package_normal_super", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Super(), "public_normal_super", "qux"));

		// Super normal super getter 
		Assert.assertEquals("qux by getter", this.getAfterSet(new Super(), "private_normal_super_getter", "qux"));
		Assert.assertEquals("qux by getter", this.getAfterSet(new Super(), "protected_normal_super_getter", "qux"));
		Assert.assertEquals("qux by getter", this.getAfterSet(new Super(), "package_normal_super_getter", "qux"));
		Assert.assertEquals("qux by getter", this.getAfterSet(new Super(), "public_normal_super_getter", "qux"));

		// Super static super
		Assert.assertEquals("qux", this.getAfterSet(new Super(), "private_static_super", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Super(), "protected_static_super", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Super(), "package_static_super", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Super(), "public_static_super", "qux"));

		// Super static super getter
		Assert.assertEquals("qux by getter", this.getAfterSet(new Super(), "private_static_super_getter", "qux"));
		Assert.assertEquals("qux by getter", this.getAfterSet(new Super(), "protected_static_super_getter", "qux"));
		Assert.assertEquals("qux by getter", this.getAfterSet(new Super(), "package_static_super_getter", "qux"));
		Assert.assertEquals("qux by getter", this.getAfterSet(new Super(), "public_static_super_getter", "qux"));

		// Sub normal super
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "private_normal_super", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "protected_normal_super", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "package_normal_super", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "public_normal_super", "qux"));

		// Sub normal super getter 
		Assert.assertEquals("qux by getter", this.getAfterSet(new Sub(), "private_normal_super_getter", "qux"));
		Assert.assertEquals("qux by getter", this.getAfterSet(new Sub(), "protected_normal_super_getter", "qux"));
		Assert.assertEquals("qux by getter", this.getAfterSet(new Sub(), "package_normal_super_getter", "qux"));
		Assert.assertEquals("qux by getter", this.getAfterSet(new Sub(), "public_normal_super_getter", "qux"));

		// Sub static super
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "private_static_super", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "protected_static_super", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "package_static_super", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "public_static_super", "qux"));

		// Sub static super getter
		Assert.assertEquals("qux by getter", this.getAfterSet(new Sub(), "private_static_super_getter", "qux"));
		Assert.assertEquals("qux by getter", this.getAfterSet(new Sub(), "protected_static_super_getter", "qux"));
		Assert.assertEquals("qux by getter", this.getAfterSet(new Sub(), "package_static_super_getter", "qux"));
		Assert.assertEquals("qux by getter", this.getAfterSet(new Sub(), "public_static_super_getter", "qux"));

		// Sub normal sub
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "private_normal_sub", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "protected_normal_sub", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "package_normal_sub", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "public_normal_sub", "qux"));

		// Sub normal sub getter
		Assert.assertEquals("qux from getter", this.getAfterSet(new Sub(), "private_normal_sub_getter", "qux"));
		Assert.assertEquals("qux from getter", this.getAfterSet(new Sub(), "protected_normal_sub_getter", "qux"));
		Assert.assertEquals("qux from getter", this.getAfterSet(new Sub(), "package_normal_sub_getter", "qux"));
		Assert.assertEquals("qux from getter", this.getAfterSet(new Sub(), "public_normal_sub_getter", "qux"));

		// Sub static sub
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "private_static_sub", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "protected_static_sub", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "package_static_sub", "qux"));
		Assert.assertEquals("qux", this.getAfterSet(new Sub(), "public_static_sub", "qux"));

		// Sub static sub getter
		Assert.assertEquals("qux from getter", this.getAfterSet(new Sub(), "private_static_sub_getter", "qux"));
		Assert.assertEquals("qux from getter", this.getAfterSet(new Sub(), "protected_static_sub_getter", "qux"));
		Assert.assertEquals("qux from getter", this.getAfterSet(new Sub(), "package_static_sub_getter", "qux"));
		Assert.assertEquals("qux from getter", this.getAfterSet(new Sub(), "public_static_sub_getter", "qux"));
	}

}
